package com.xijia.proxy.service.impl;

import com.xijia.proxy.ext.ExtAsync;
import com.xijia.proxy.service.OrderService;


/**
  *
  * @author wangsong
  * @mail  1720696548@qq.com
  * @date  2020/8/30 0030 21:52
  * @version 1.0.0
  */
public class OrderServiceImpl implements OrderService {
    private OrderService orderServiceProxy;

    @Override
    public String addOrder() {
        System.out.println(Thread.currentThread().getName() + ">>>流程1");
        orderServiceProxy.addOrderLog();
        System.out.println(Thread.currentThread().getName() + ">>>流程3");
        return "addOrder";
    }

    @Override
    @ExtAsync
    public void addOrderLog() {
        System.out.println(Thread.currentThread().getName() + ">>>流程2");
    }

    public void setOrderServiceProxy(OrderService orderServiceProxy) {
        this.orderServiceProxy = orderServiceProxy;
    }
}
